//导入http模块
import http from '../utils/http'
const req = {
    //通用函数模块
    async reqMethod(params){
     
        let result = '';
        if(params.method ==='get'){

            if(params.param.length === 0){
                result =  await http.get('/get'+params.methodName)
            }else{
                result =  await http.get('/get'+params.methodName+'/'+params.param[0])
            }
             
            return result;
            
        }else{

            if(params.param.length === 0){
                result =  await http.post('/'+param.methodName)
            }else{
                
                result =  await http.post('/'+params.methodName,params.param[0])
            }
             
            return result;
        }
        
    }
}
export default req;